package com.atmaowei.mapper;

import com.atmaowei.controller.request.CoursePageRequest;
import com.atmaowei.entity.Course;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface CourseMapper {

    public void save(Course course);

    List<Course> page(CoursePageRequest coursePageRequest);

    void delete(String cno);

    void update(@Param("course") Course course,@Param("oldCno") String oldCno);

    Course getByCno(String cno);

    List<Course> getAllCourse();

    String getCnoByCname(String cname);

    String getCnameByCno(String cno);

    void deleteCpnoEqualCno(String cpno);

    void deleteSelected(String cno);
}
